package per.songyu.pj.health.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class HealthController {

    @RequestMapping("/doHealth")
    public ModelAndView doHealth(){
        ModelAndView mv = new ModelAndView();
        mv.setViewName("default");
        mv.addObject("username","你爸爸");
        mv.addObject("state","爆屌");
        return mv;
    }

    @RequestMapping("/doHealth2")
    public String doHealth2(Model model){
        model.addAttribute("username","你妈妈");
        model.addAttribute("state","爆屌");

        return "default";
    }
}
